<div id="mainbar">
    <div id="questions" class="content-padding">
        {% if questions.count > 0 %}
            {% for question in questions %}
                <div id="question_{{ question.id }}" class="qu-cont holder"
                     style="text-align: left;overflow: visible;height: 114px;width: 1110px;position: relative">
                    <div class="stats">
                        <div class="votes">
                            <span class="vote-count-post">{{ question.votes_num }}</span>
                            <div class="viewcount">votes</div>
                        </div>
                        {% if question.get_answers_num > 0 %}
                            <div class="answered">
                                <span class="vote-count-post">{{ question.get_answers_num }}</span>
                                <div class="viewcount">answs</div>
                            </div>
                        {% else %}
                            <div class="answered" style=" color: #555555;">
                                <span class="vote-count-post">{{ question.get_answers_num }}</span>
                                <div class="viewcount">answs</div>
                            </div>
                        {% endif %}
                        <div class="views">
                            <span class="vote-count-post">{{ question.get_views_num }}</span>
                            <div class="viewcount">views</div>
                        </div>
                    </div>
                    <div class="question-summary unselected">
                        <input name="cid" type="hidden" value="{{ question.id }}">
                        <input name="aperms" type="hidden" value="{{ question.aperms }}"/>
                        <div class="excerpt content">
                            {% autoescape off %}
                                {{ question.content|make_html|add_highlights:query }}
                            {% endautoescape %}
                        </div>
                        <div style="width: 631px;height: 19px;background-color: inherit;position: absolute;bottom: 0;left: 66px;
                                border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;">
                            <div name="footer" style="height: 100%;width: 320px;float: left;background-color: inherit;margin-left: 5px">
                            </div>
                            <p style="float: right;font-size: 11px;font-style: oblique;font-family: sans-serif;color: #555555;padding-right: 7px;margin-top: 2px;margin-bottom: 3px">
                                {{ question.author.get_short_name }}, {{ question.date|date:"M j" }} at {{ question.date|date:"G:i" }}
                            </p>
                        </div>
                    </div>
                </div>
                <div style="width: 632px;height: 5px;"></div>
            {% endfor %}
        {% else %}
            <div class="question-empty">
                <div style="height: auto;width: 631px;margin-top: 20px;font-family: Monaco, monospace, sans-serif;font-size: 12px">
                    Sorry, nothing matched your query.
                </div>
            </div>
        {% endif %}
    </div>
    <div id="footer">
        {% if questions.count > 0 %}
            <div id="pager">
                {% if prev_page < curr_page %}
                    <span class="selector" onclick="loadQuestionsPage({{ prev_page }})">prev</span>
                {% endif %}
                {% for page in pages_range %}
                    {% if page == curr_page %}
                        <span class="pagepointer">{{ page }}</span>
                    {% else %}
                        <span class="selector" onclick="loadQuestionsPage({{ page }})">{{ page }}</span>
                    {% endif %}
                {% endfor %}
                {% if next_page > curr_page %}
                    <span class="selector" onclick="loadQuestionsPage('{{ next_page }}')">next</span>
                {% endif %}
            </div>
        {% endif %}
    </div>
</div>
